package vip.liux.backend.infrastructure.excel;


import lombok.Data;
import vip.liux.backend.infrastructure.excel.handler.BaseAnalysisEventListener;
import vip.liux.backend.infrastructure.excel.handler.DefaultAnalysisEventListener;
import vip.liux.backend.infrastructure.excel.hook.DefaultImportExcelHook;
import vip.liux.backend.infrastructure.excel.hook.ImportExcelHook;

import java.util.Collections;
import java.util.List;

/**
 * Excel 导入上下文配置
 */
@Data
public class ImportContext {
    /**
     * 读取监听器类型，默认使用 DefaultAnalysisEventListener
     */
    private Class<? extends BaseAnalysisEventListener<?>> readListener = DefaultAnalysisEventListener.class;
    /**
     * 钩子类集合，默认包含 DefaultImportExcelHook
     */
    private List<Class<? extends ImportExcelHook>> hooks = Collections.singletonList(DefaultImportExcelHook.class);
    /**
     * 标题行数，默认1行
     */
    private int headRowNumber = 1;
    /**
     * 是否忽略空行，默认不忽略
     */
    private boolean ignoreEmptyRow = false;
}